﻿<%@ Page Language="C#" Inherits="E.Web.training.signup.Register" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>课程报名</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_signup.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript">
      function ConfirmSignUp(v, v2, signuptypeid) {
      if (confirm('确定要选择报名该课程吗？')) {
        document.getElementById("form1").action = "/training/signup/SignUp.aspx";
        $("#CIDValue").val(v);
        $("#CRIDValue").val(v2);
        $("#signuptypeid").val(signuptypeid);
        document.getElementById("form1").submit();
      }
    }
  </script>
</head>
<body>
  <form id="form1" method="post" action="?act=s">  
    <div class="m_top"></div>
    <div class="block" style="height:100px;">
      <div style="width:650px; height:22px;">
        <img alt="" src="/images/training/icon/coursesearch.gif" class="fl" />
        <div class="title">&nbsp;课程搜索</div>
      </div>
      <div class="spe_line_1"></div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl" style="line-height:23px;">课程名称：</div>
        <div class="fl"><input type="text" id="CourseNameTxt" name="CourseNameTxt" value="<%=coursename %>" /></div>
        <div class="fl" style="line-height:23px;">&nbsp;类别：</div>
        <div class="fl">
          <select id="CategorySlt" name="CategorySlt" style="*margin-top:2px; _margin-top:2px;">
            <option value="-1">请选择</option>
            <% if (cc_list.Count > 0) { %>
              <% foreach (CourseCategoryModel model in cc_list) { %>
            <option value="<%=model.ID %>"><%=model.Name%></option>
              <% } %>
            <% } %>
          </select>
        </div>
        <div class="fl">&nbsp;&nbsp;<input type="image" style="width:54px; height:23px;" src="/images/training/btn/search.gif" /></div>
      </div>
    </div>
    
    <div class="block">
      <div style="width:650px; height:22px;">
        <img alt="" src="/images/training/icon/courseschedule.gif" class="fl" />
        <div class="title">&nbsp;课程选择</div>
      </div>
      <div class="spe_line_2"></div>
      
    <% if (classList != null && classList.Count > 0) { %>
            
      <div id="classdatatable">
        <div class="c_rows" style="font-weight:bolder;">
          <div class="c_r_cd">班级编号</div>
          <div class="c_r_t">课程</div>
          <div class="c_r_c">分类</div>
          <div class="c_r_tn">讲师</div>
          <div class="c_r_st">培训时间</div>
          <div class="c_r_m">允许人数</div>
          <div class="c_r_cc">已报人数</div>
          <div class="c_r_o">报名</div>
        </div>
        <% foreach (ShortClassModel model in classList) { %>
        <div class="c_rows">
          <div class="c_r_cd"><%=model.ClassCode%></div>
          <div class="c_r_t"><%=model.CourseName%></div>
          <div class="c_r_c"><%=model.CourseCategoryName%></div>
          <div class="c_r_tn"><%=model.TeacherName %></div>
          <div class="c_r_st"><%=model.StartTime.ToString("yyyy.M.d")%>-<%=model.EndTime.ToString("yyyy.M.d")%></div>
          <div class="c_r_m"><%=model.MaxCount %></div>
          <div class="c_r_cc"><%=model.CurrentCount %></div>
          <div class="c_r_o">
            <img alt="" src="/images/training/icon/pencil_s.gif" style="margin-top:5px;" class="cursor" onclick="ConfirmSignUp(<%=model.ID %>, <%=model.CourseRelationID %>,<%=model.SignUpType %>);" />
          </div>
        </div>
        <% } %>
        
      </div>
      <div class="fr" style="margin:8px 0 0 0;"><%=mypager%></div>
      <input type="hidden" id="CIDValue" name="CIDValue" value="-1" />
      <input type="hidden" id="CRIDValue" name="CRIDValue" value="-1" />
      <input type="hidden" id="signuptypeid" name="signuptypeid" />
      
    <% } else { %>
    <% } %>
    
    </div>
  </form>
  <% if (categoryid != -1) { %>
  <script type="text/javascript">
  $("#CategorySlt").val(<%=categoryid %>);
  </script>
  <% } %>
</body>
</html>
